package com.telit.firecommand.dao;

import com.telit.firecommand.entity.FireSmsPushLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FireSmsPushLogDao {
    int deleteByPrimaryKey(Long id);

    int insert(FireSmsPushLog record);

    int insertSelective(FireSmsPushLog record);

    FireSmsPushLog selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FireSmsPushLog record);

    int updateByPrimaryKey(FireSmsPushLog record);


    /**
     * 根据火情id和状态查询消息推送记录
     * @param fireId
     * @param status
     * @param person
     * @return
     */
    List<FireSmsPushLog> queryAllByFireId(@Param("fireId") Long fireId, @Param("status") int status, @Param("person")String person);


    /**
     * 根据火情id和状态查询消息发送人
     * @param fireId
     * @param status
     * @return
     */
    List<String> querySendPerson(@Param("fireId") Long fireId, @Param("status")int status);
}